import requests
from lxml import etree, html

url = 'https://zz.zu.anjuke.com/?from=HomePage_TopBar'
res = requests.get(url)
res = res.content.decode('utf8')
html_tree = etree.HTML(res)
datas = html_tree.xpath(
    "//div[@class='maincontent']/div[@id='list-content']/div[@class='zu-itemmod clearfix']/div[@class='zu-info']/h3")
# print(dir(datas))
for data in datas:
    # print(data.text)
    titles = data.xpath('./a/b/text()')
    print(titles[0])
    # for title in titles:
    #     print(title.text)
    # break
